//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

import Foundation
import SotoCore

extension Amplify {
    // MARK: Enums

    public enum DomainStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case available = "AVAILABLE"
        case creating = "CREATING"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case pendingDeployment = "PENDING_DEPLOYMENT"
        case pendingVerification = "PENDING_VERIFICATION"
        case requestingCertificate = "REQUESTING_CERTIFICATE"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum JobStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case cancelled = "CANCELLED"
        case cancelling = "CANCELLING"
        case failed = "FAILED"
        case pending = "PENDING"
        case provisioning = "PROVISIONING"
        case running = "RUNNING"
        case succeed = "SUCCEED"
        public var description: String { return self.rawValue }
    }

    public enum JobType: String, CustomStringConvertible, Codable, _SotoSendable {
        case manual = "MANUAL"
        case release = "RELEASE"
        case retry = "RETRY"
        case webHook = "WEB_HOOK"
        public var description: String { return self.rawValue }
    }

    public enum Platform: String, CustomStringConvertible, Codable, _SotoSendable {
        case web = "WEB"
        case webCompute = "WEB_COMPUTE"
        case webDynamic = "WEB_DYNAMIC"
        public var description: String { return self.rawValue }
    }

    public enum RepositoryCloneMethod: String, CustomStringConvertible, Codable, _SotoSendable {
        case sigv4 = "SIGV4"
        case ssh = "SSH"
        case token = "TOKEN"
        public var description: String { return self.rawValue }
    }

    public enum Stage: String, CustomStringConvertible, Codable, _SotoSendable {
        case beta = "BETA"
        case development = "DEVELOPMENT"
        case experimental = "EXPERIMENTAL"
        case production = "PRODUCTION"
        case pullRequest = "PULL_REQUEST"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct App: AWSDecodableShape {
        ///  The Amazon Resource Name (ARN) of the Amplify app.
        public let appArn: String
        ///  The unique ID of the Amplify app.
        public let appId: String
        ///  Describes the automated branch creation configuration for the Amplify app.
        public let autoBranchCreationConfig: AutoBranchCreationConfig?
        ///  Describes the automated branch creation glob patterns for the Amplify app.
        public let autoBranchCreationPatterns: [String]?
        ///  The basic authorization credentials for branches for the Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password.
        public let basicAuthCredentials: String?
        ///  Describes the content of the build specification (build spec) for the Amplify app.
        public let buildSpec: String?
        ///  Creates a date and time for the Amplify app.
        public let createTime: Date
        /// Describes the custom HTTP headers for the Amplify app.
        public let customHeaders: String?
        ///  Describes the custom redirect and rewrite rules for the Amplify app.
        public let customRules: [CustomRule]?
        ///  The default domain for the Amplify app.
        public let defaultDomain: String
        ///  The description for the Amplify app.
        public let description: String?
        ///  Enables automated branch creation for the Amplify app.
        public let enableAutoBranchCreation: Bool?
        ///  Enables basic authorization for the Amplify app's branches.
        public let enableBasicAuth: Bool
        ///  Enables the auto-building of branches for the Amplify app.
        public let enableBranchAutoBuild: Bool
        ///  Automatically disconnect a branch in the Amplify Console when you delete a branch from your Git repository.
        public let enableBranchAutoDeletion: Bool?
        ///  The environment variables for the Amplify app.
        public let environmentVariables: [String: String]?
        ///  The AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) of the Amplify app.
        public let iamServiceRoleArn: String?
        ///  The name for the Amplify app.
        public let name: String
        ///  The platform for the Amplify app. For a static app, set the platform type to WEB. For a dynamic server-side rendered (SSR) app, set the platform type to WEB_COMPUTE. For an app requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC.
        public let platform: Platform
        ///  Describes the information about a production branch of the Amplify app.
        public let productionBranch: ProductionBranch?
        ///  The Git repository for the Amplify app.
        public let repository: String?
        ///  This is for internal use.  The Amplify service uses this parameter to specify the authentication protocol to use to access the Git repository for an Amplify app. Amplify specifies TOKEN for a GitHub repository, SIGV4 for an Amazon Web Services CodeCommit repository, and SSH for GitLab and Bitbucket repositories.
        public let repositoryCloneMethod: RepositoryCloneMethod?
        ///  The tag for the Amplify app.
        public let tags: [String: String]?
        ///  Updates the date and time for the Amplify app.
        public let updateTime: Date

        public init(appArn: String, appId: String, autoBranchCreationConfig: AutoBranchCreationConfig? = nil, autoBranchCreationPatterns: [String]? = nil, basicAuthCredentials: String? = nil, buildSpec: String? = nil, createTime: Date, customHeaders: String? = nil, customRules: [CustomRule]? = nil, defaultDomain: String, description: String? = nil, enableAutoBranchCreation: Bool? = nil, enableBasicAuth: Bool, enableBranchAutoBuild: Bool, enableBranchAutoDeletion: Bool? = nil, environmentVariables: [String: String]? = nil, iamServiceRoleArn: String? = nil, name: String, platform: Platform, productionBranch: ProductionBranch? = nil, repository: String? = nil, repositoryCloneMethod: RepositoryCloneMethod? = nil, tags: [String: String]? = nil, updateTime: Date) {
            self.appArn = appArn
            self.appId = appId
            self.autoBranchCreationConfig = autoBranchCreationConfig
            self.autoBranchCreationPatterns = autoBranchCreationPatterns
            self.basicAuthCredentials = basicAuthCredentials
            self.buildSpec = buildSpec
            self.createTime = createTime
            self.customHeaders = customHeaders
            self.customRules = customRules
            self.defaultDomain = defaultDomain
            self.description = description
            self.enableAutoBranchCreation = enableAutoBranchCreation
            self.enableBasicAuth = enableBasicAuth
            self.enableBranchAutoBuild = enableBranchAutoBuild
            self.enableBranchAutoDeletion = enableBranchAutoDeletion
            self.environmentVariables = environmentVariables
            self.iamServiceRoleArn = iamServiceRoleArn
            self.name = name
            self.platform = platform
            self.productionBranch = productionBranch
            self.repository = repository
            self.repositoryCloneMethod = repositoryCloneMethod
            self.tags = tags
            self.updateTime = updateTime
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appId
            case autoBranchCreationConfig
            case autoBranchCreationPatterns
            case basicAuthCredentials
            case buildSpec
            case createTime
            case customHeaders
            case customRules
            case defaultDomain
            case description
            case enableAutoBranchCreation
            case enableBasicAuth
            case enableBranchAutoBuild
            case enableBranchAutoDeletion
            case environmentVariables
            case iamServiceRoleArn
            case name
            case platform
            case productionBranch
            case repository
            case repositoryCloneMethod
            case tags
            case updateTime
        }
    }

    public struct Artifact: AWSDecodableShape {
        ///  The file name for the artifact.
        public let artifactFileName: String
        ///  The unique ID for the artifact.
        public let artifactId: String

        public init(artifactFileName: String, artifactId: String) {
            self.artifactFileName = artifactFileName
            self.artifactId = artifactId
        }

        private enum CodingKeys: String, CodingKey {
            case artifactFileName
            case artifactId
        }
    }

    public struct AutoBranchCreationConfig: AWSEncodableShape & AWSDecodableShape {
        ///  The basic authorization credentials for the autocreated branch. You must base64-encode the authorization credentials and provide them in the format user:password.
        public let basicAuthCredentials: String?
        ///  The build specification (build spec) for the autocreated branch.
        public let buildSpec: String?
        ///  Enables auto building for the autocreated branch.
        public let enableAutoBuild: Bool?
        ///  Enables basic authorization for the autocreated branch.
        public let enableBasicAuth: Bool?
        /// Enables performance mode for the branch. Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out.
        public let enablePerformanceMode: Bool?
        ///  Enables pull request previews for the autocreated branch.
        public let enablePullRequestPreview: Bool?
        ///  The environment variables for the autocreated branch.
        public let environmentVariables: [String: String]?
        ///  The framework for the autocreated branch.
        public let framework: String?
        ///  The Amplify environment name for the pull request.
        public let pullRequestEnvironmentName: String?
        ///  Describes the current stage for the autocreated branch.
        public let stage: Stage?

        public init(basicAuthCredentials: String? = nil, buildSpec: String? = nil, enableAutoBuild: Bool? = nil, enableBasicAuth: Bool? = nil, enablePerformanceMode: Bool? = nil, enablePullRequestPreview: Bool? = nil, environmentVariables: [String: String]? = nil, framework: String? = nil, pullRequestEnvironmentName: String? = nil, stage: Stage? = nil) {
            self.basicAuthCredentials = basicAuthCredentials
            self.buildSpec = buildSpec
            self.enableAutoBuild = enableAutoBuild
            self.enableBasicAuth = enableBasicAuth
            self.enablePerformanceMode = enablePerformanceMode
            self.enablePullRequestPreview = enablePullRequestPreview
            self.environmentVariables = environmentVariables
            self.framework = framework
            self.pullRequestEnvironmentName = pullRequestEnvironmentName
            self.stage = stage
        }

        public func validate(name: String) throws {
            try self.validate(self.basicAuthCredentials, name: "basicAuthCredentials", parent: name, max: 2000)
            try self.validate(self.basicAuthCredentials, name: "basicAuthCredentials", parent: name, pattern: "^(?s)")
            try self.validate(self.buildSpec, name: "buildSpec", parent: name, max: 25000)
            try self.validate(self.buildSpec, name: "buildSpec", parent: name, min: 1)
            try self.validate(self.buildSpec, name: "buildSpec", parent: name, pattern: "^(?s).+$")
            try self.environmentVariables?.forEach {
                try validate($0.key, name: "environmentVariables.key", parent: name, max: 255)
                try validate($0.key, name: "environmentVariables.key", parent: name, pattern: "^(?s)")
                try validate($0.value, name: "environmentVariables[\"\($0.key)\"]", parent: name, max: 5500)
                try validate($0.value, name: "environmentVariables[\"\($0.key)\"]", parent: name, pattern: "^(?s)")
            }
            try self.validate(self.framework, name: "framework", parent: name, max: 255)
            try self.validate(self.framework, name: "framework", parent: name, pattern: "^(?s)")
            try self.validate(self.pullRequestEnvironmentName, name: "pullRequestEnvironmentName", parent: name, max: 20)
            try self.validate(self.pullRequestEnvironmentName, name: "pullRequestEnvironmentName", parent: name, pattern: "^(?s)")
        }

        private enum CodingKeys: String, CodingKey {
            case basicAuthCredentials
            case buildSpec
            case enableAutoBuild
            case enableBasicAuth
            case enablePerformanceMode
            case enablePullRequestPreview
            case environmentVariables
            case framework
            case pullRequestEnvironmentName
            case stage
        }
    }

    public struct BackendEnvironment: AWSDecodableShape {
        ///  The Amazon Resource Name (ARN) for a backend environment that is part of an Amplify app.
        public let backendEnvironmentArn: String
        ///  The creation date and time for a backend environment that is part of an Amplify app.
        public let createTime: Date
        ///  The name of deployment artifacts.
        public let deploymentArtifacts: String?
        ///  The name for a backend environment that is part of an Amplify app.
        public let environmentName: String
        ///  The AWS CloudFormation stack name of a backend environment.
        public let stackName: String?
        ///  The last updated date and time for a backend environment that is part of an Amplify app.
        public let updateTime: Date

        public init(backendEnvironmentArn: String, createTime: Date, deploymentArtifacts: String? = nil, environmentName: String, stackName: String? = nil, updateTime: Date) {
            self.backendEnvironmentArn = backendEnvironmentArn
            self.createTime = createTime
            self.deploymentArtifacts = deploymentArtifacts
            self.environmentName = environmentName
            self.stackName = stackName
            self.updateTime = updateTime
        }

        private enum CodingKeys: String, CodingKey {
            case backendEnvironmentArn
            case createTime
            case deploymentArtifacts
            case environmentName
            case stackName
            case updateTime
        }
    }

    public struct Branch: AWSDecodableShape {
        ///  The ID of the active job for a branch of an Amplify app.
        public let activeJobId: String
        ///  A list of custom resources that are linked to this branch.
        public let associatedResources: [String]?
        ///  The Amazon Resource Name (ARN) for a backend environment that is part of an Amplify app.
        public let backendEnvironmentArn: String?
        ///  The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password.
        public let basicAuthCredentials: String?
        ///  The Amazon Resource Name (ARN) for a branch that is part of an Amplify app.
        public let branchArn: String
        ///  The name for the branch that is part of an Amplify app.
        public let branchName: String
        ///  The build specification (build spec) content for the branch of an Amplify app.
        public let buildSpec: String?
        ///  The creation date and time for a branch that is part of an Amplify app.
        public let createTime: Date
        ///  The custom domains for a branch of an Amplify app.
        public let customDomains: [String]
        ///  The description for the branch that is part of an Amplify app.
        public let description: String
        ///  The destination branch if the branch is a pull request branch.
        public let destinationBranch: String?
        ///  The display name for the branch. This is used as the default domain prefix.
        public let displayName: String
        ///  Enables auto-building on push for a branch of an Amplify app.
        public let enableAutoBuild: Bool
        ///  Enables basic authorization for a branch of an Amplify app.
        public let enableBasicAuth: Bool
        ///  Enables notifications for a branch that is part of an Amplify app.
        public let enableNotification: Bool
        /// Enables performance mode for the branch. Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out.
        public let enablePerformanceMode: Bool?
        ///  Enables pull request previews for the branch.
        public let enablePullRequestPreview: Bool
        ///  The environment variables specific to a branch of an Amplify app.
        public let environmentVariables: [String: String]
        ///  The framework for a branch of an Amplify app.
        public let framework: String
        ///  The Amplify environment name for the pull request.
        public let pullRequestEnvironmentName: String?
        ///  The source branch if the branch is a pull request branch.
        public let sourceBranch: String?
        ///  The current stage for the branch that is part of an Amplify app.
        public let stage: Stage
        ///  The tag for the branch of an Amplify app.
        public let tags: [String: String]?
        ///  The thumbnail URL for the branch of an Amplify app.
        public let thumbnailUrl: String?
        ///  The total number of jobs that are part of an Amplify app.
        public let totalNumberOfJobs: String
        ///  The content Time to Live (TTL) for the website in seconds.
        public let ttl: String
        ///  The last updated date and time for a branch that is part of an Amplify app.
        public let updateTime: Date

        public init(activeJobId: String, associatedResources: [String]? = nil, backendEnvironmentArn: String? = nil, basicAuthCredentials: String? = nil, branchArn: String, branchName: String, buildSpec: String? = nil, createTime: Date, customDomains: [String], description: String, destinationBranch: String? = nil, displayName: String, enableAutoBuild: Bool, enableBasicAuth: Bool, enableNotification: Bool, enablePerformanceMode: Bool? = nil, enablePullRequestPreview: Bool, environmentVariables: [String: String], framework: String, pullRequestEnvironmentName: String? = nil, sourceBranch: String? = nil, stage: Stage, tags: [String: String]? = nil, thumbnailUrl: String? = nil, totalNumberOfJobs: String, ttl: String, updateTime: Date) {
            self.activeJobId = activeJobId
            self.associatedResources = associatedResources
            self.backendEnvironmentArn = backendEnvironmentArn
            self.basicAuthCredentials = basicAuthCredentials
            self.branchArn = branchArn
            self.branchName = branchName
            self.buildSpec = buildSpec
            self.createTime = createTime
            self.customDomains = customDomains
            self.description = description
            self.destinationBranch = destinationBranch
            self.displayName = displayName
            self.enableAutoBuild = enableAutoBuild
            self.enableBasicAuth = enableBasicAuth
            self.enableNotification = enableNotification
            self.enablePerformanceMode = enablePerformanceMode
            self.enablePullRequestPreview = enablePullRequestPreview
            self.environmentVariables = environmentVariables
            self.framework = framework
            self.pullRequestEnvironmentName = pullRequestEnvironmentName
            self.sourceBranch = sourceBranch
            self.stage = stage
            self.tags = tags
            self.thumbnailUrl = thumbnailUrl
            self.totalNumberOfJobs = totalNumberOfJobs
            self.ttl = ttl
            self.updateTime = updateTime
        }

        private enum CodingKeys: String, CodingKey {
            case activeJobId
            case associatedResources
            case backendEnvironmentArn
            case basicAuthCredentials
            case branchArn
            case branchName
            case buildSpec
            case createTime
            case customDomains
            case description
            case destinationBranch
            case displayName
            case enableAutoBuild
            case enableBasicAuth
            case enableNotification
            case enablePerformanceMode
            case enablePullRequestPreview
            case environmentVariables
            case framework
            case pullRequestEnvironmentName
            case sourceBranch
            case stage
            case tags
            case thumbnailUrl
            case totalNumberOfJobs
            case ttl
            case updateTime
        }
    }

    public struct CreateAppRequest: AWSEncodableShape {
        /// The personal access token for a GitHub repository for an Amplify app. The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored. Use accessToken for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use oauthToken. You must specify either accessToken or oauthToken when you create a new app. Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide .
        public let accessToken: String?
        ///  The automated branch creation configuration for an Amplify app.
        public let autoBranchCreationConfig: AutoBranchCreationConfig?
        ///  The automated branch creation glob patterns for an Amplify app.
        public let autoBranchCreationPatterns: [String]?
        ///  The credentials for basic authorization for an Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password.
        public let basicAuthCredentials: String?
        ///  The build specification (build spec) for an Amplify app.
        public let buildSpec: String?
        /// The custom HTTP headers for an Amplify app.
        public let customHeaders: String?
        ///  The custom rewrite and redirect rules for an Amplify app.
        public let customRules: [CustomRule]?
        ///  The description for an Amplify app.
        public let description: String?
        ///  Enables automated branch creation for an Amplify app.
        public let enableAutoBranchCreation: Bool?
        ///  Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app.
        public let enableBasicAuth: Bool?
        ///  Enables the auto building of branches for an Amplify app.
        public let enableBranchAutoBuild: Bool?
        ///  Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git repository.
        public let enableBranchAutoDeletion: Bool?
        ///  The environment variables map for an Amplify app.
        public let environmentVariables: [String: String]?
        ///  The AWS Identity and Access Management (IAM) service role for an Amplify app.
        public let iamServiceRoleArn: String?
        ///  The name for an Amplify app.
        public let name: String
        /// The OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored. Use oauthToken for repository providers other than GitHub, such as Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, use accessToken. You must specify either oauthToken or accessToken when you create a new app. Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide .
        public let oauthToken: String?
        ///  The platform for the Amplify app. For a static app, set the platform type to WEB. For a dynamic server-side rendered (SSR) app, set the platform type to WEB_COMPUTE. For an app requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC.
        public let platform: Platform?
        ///  The repository for an Amplify app.
        public let repository: String?
        ///  The tag for an Amplify app.
        public let tags: [String: String]?

        public init(accessToken: String? = nil, autoBranchCreationConfig: AutoBranchCreationConfig? = nil, autoBranchCreationPatterns: [String]? = nil, basicAuthCredentials: String? = nil, buildSpec: String? = nil, customHeaders: String? = nil, customRules: [CustomRule]? = nil, description: String? = nil, enableAutoBranchCreation: Bool? = nil, enableBasicAuth: Bool? = nil, enableBranchAutoBuild: Bool? = nil, enableBranchAutoDeletion: Bool? = nil, environmentVariables: [String: String]? = nil, iamServiceRoleArn: String? = nil, name: String, oauthToken: String? = nil, platform: Platform? = nil, repository: String? = nil, tags: [String: String]? = nil) {
            self.accessToken = accessToken
            self.autoBranchCreationConfig = autoBranchCreationConfig
            self.autoBranchCreationPatterns = autoBranchCreationPatterns
            self.basicAuthCredentials = basicAuthCredentials
            self.buildSpec = buildSpec
            self.customHeaders = customHeaders
            self.customRules = customRules
            self.description = description
            self.enableAutoBranchCreation = enableAutoBranchCreation
            self.enableBasicAuth = enableBasicAuth
            self.enableBranchAutoBuild = enableBranchAutoBuild
            self.enableBranchAutoDeletion = enableBranchAutoDeletion
            self.environmentVariables = environmentVariables
            self.iamServiceRoleArn = iamServiceRoleArn
            self.name = name
            self.oauthToken = oauthToken
            self.platform = platform
            self.repository = repository
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, max: 255)
            try self.validate(self.accessToken, name: "accessToken", parent: name, min: 1)
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^(?s).+$")
            try self.autoBranchCreationConfig?.validate(name: "\(name).autoBranchCreationConfig")
            try self.autoBranchCreationPatterns?.forEach {
                try validate($0, name: "autoBranchCreationPatterns[]", parent: name, max: 2048)
                try validate($0, name: "autoBranchCreationPatterns[]", parent: name, min: 1)
                try validate($0, name: "autoBranchCreationPatterns[]", parent: name, pattern: "^(?s).+$")
            }
            try self.validate(self.basicAuthCredentials, name: "basicAuthCredentials", parent: name, max: 2000)
            try self.validate(self.basicAuthCredentials, name: "basicAuthCredentials", parent: name, pattern: "^(?s)")
            try self.validate(self.buildSpec, name: "buildSpec", parent: name, max: 25000)
            try self.validate(self.buildSpec, name: "buildSpec", parent: name, min: 1)
            try self.validate(self.buildSpec, name: "buildSpec", parent: name, pattern: "^(?s).+$")
            try self.validate(self.customHeaders, name: "customHeaders", parent: name, max: 25000)
            try self.validate(self.customHeaders, name: "customHeaders", parent: name, pattern: "^(?s)")
            try self.customRules?.forEach {
                try $0.validate(name: "\(name).customRules[]")
            }
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^(?s)")
            try self.environmentVariables?.forEach {
                try validate($0.key, name: "environmentVariables.key", parent: name, max: 255)
                try validate($0.key, name: "environmentVariables.key", parent: name, pattern: "^(?s)")
                try validate($0.value, name: "environmentVariables[\"\($0.key)\"]", parent: name, max: 5500)
                try validate($0.value, name: "environmentVariables[\"\($0.key)\"]", parent: name, pattern: "^(?s)")
            }
            try self.validate(self.iamServiceRoleArn, name: "iamServiceRoleArn", parent: name, max: 1000)
            try self.validate(self.iamServiceRoleArn, name: "iamServiceRoleArn", parent: name, pattern: "^(?s)")
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^(?s).+$")
            try self.validate(self.oauthToken, name: "oauthToken", parent: name, max: 1000)
            try self.validate(self.oauthToken, name: "oauthToken", parent: name, pattern: "^(?s)")
            try self.validate(self.repository, name: "repository", parent: name, max: 1000)
            try self.validate(self.repository, name: "repository", parent: name, pattern: "^(?s)")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken
            case autoBranchCreationConfig
            case autoBranchCreationPatterns
            case basicAuthCredentials
            case buildSpec
            case customHeaders
            case customRules
            case description
            case enableAutoBranchCreation
            case enableBasicAuth
            case enableBranchAutoBuild
            case enableBranchAutoDeletion
            case environmentVariables
            case iamServiceRoleArn
            case name
            case oauthToken
            case platform
            case repository
            case tags
        }
    }

    public struct CreateAppResult: AWSDecodableShape {
        public let app: App

        public init(app: App) {
            self.app = app
        }

        private enum CodingKeys: String, CodingKey {
            case app
        }
    }

    public struct CreateBackendEnvironmentRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The name of deployment artifacts.
        public let deploymentArtifacts: String?
        ///  The name for the backend environment.
        public let environmentName: String
        ///  The AWS CloudFormation stack name of a backend environment.
        public let stackName: String?

        public init(appId: String, deploymentArtifacts: String? = nil, environmentName: String, stackName: String? = nil) {
            self.appId = appId
            self.deploymentArtifacts = deploymentArtifacts
            self.environmentName = environmentName
            self.stackName = stackName
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.deploymentArtifacts, name: "deploymentArtifacts", parent: name, max: 1000)
            try self.validate(self.deploymentArtifacts, name: "deploymentArtifacts", parent: name, min: 1)
            try self.validate(self.deploymentArtifacts, name: "deploymentArtifacts", parent: name, pattern: "^(?s).+$")
            try self.validate(self.environmentName, name: "environmentName", parent: name, max: 255)
            try self.validate(self.environmentName, name: "environmentName", parent: name, min: 1)
            try self.validate(self.environmentName, name: "environmentName", parent: name, pattern: "^(?s).+$")
            try self.validate(self.stackName, name: "stackName", parent: name, max: 255)
            try self.validate(self.stackName, name: "stackName", parent: name, min: 1)
            try self.validate(self.stackName, name: "stackName", parent: name, pattern: "^(?s).+$")
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentArtifacts
            case environmentName
            case stackName
        }
    }

    public struct CreateBackendEnvironmentResult: AWSDecodableShape {
        ///  Describes the backend environment for an Amplify app.
        public let backendEnvironment: BackendEnvironment

        public init(backendEnvironment: BackendEnvironment) {
            self.backendEnvironment = backendEnvironment
        }

        private enum CodingKeys: String, CodingKey {
            case backendEnvironment
        }
    }

    public struct CreateBranchRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The Amazon Resource Name (ARN) for a backend environment that is part of an Amplify app.
        public let backendEnvironmentArn: String?
        ///  The basic authorization credentials for the branch. You must base64-encode the authorization credentials and provide them in the format user:password.
        public let basicAuthCredentials: String?
        ///  The name for the branch.
        public let branchName: String
        ///  The build specification (build spec) for the branch.
        public let buildSpec: String?
        ///  The description for the branch.
        public let description: String?
        ///  The display name for a branch. This is used as the default domain prefix.
        public let displayName: String?
        ///  Enables auto building for the branch.
        public let enableAutoBuild: Bool?
        ///  Enables basic authorization for the branch.
        public let enableBasicAuth: Bool?
        ///  Enables notifications for the branch.
        public let enableNotification: Bool?
        /// Enables performance mode for the branch. Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out.
        public let enablePerformanceMode: Bool?
        ///  Enables pull request previews for this branch.
        public let enablePullRequestPreview: Bool?
        ///  The environment variables for the branch.
        public let environmentVariables: [String: String]?
        ///  The framework for the branch.
        public let framework: String?
        ///  The Amplify environment name for the pull request.
        public let pullRequestEnvironmentName: String?
        ///  Describes the current stage for the branch.
        public let stage: Stage?
        ///  The tag for the branch.
        public let tags: [String: String]?
        ///  The content Time To Live (TTL) for the website in seconds.
        public let ttl: String?

        public init(appId: String, backendEnvironmentArn: String? = nil, basicAuthCredentials: String? = nil, branchName: String, buildSpec: String? = nil, description: String? = nil, displayName: String? = nil, enableAutoBuild: Bool? = nil, enableBasicAuth: Bool? = nil, enableNotification: Bool? = nil, enablePerformanceMode: Bool? = nil, enablePullRequestPreview: Bool? = nil, environmentVariables: [String: String]? = nil, framework: String? = nil, pullRequestEnvironmentName: String? = nil, stage: Stage? = nil, tags: [String: String]? = nil, ttl: String? = nil) {
            self.appId = appId
            self.backendEnvironmentArn = backendEnvironmentArn
            self.basicAuthCredentials = basicAuthCredentials
            self.branchName = branchName
            self.buildSpec = buildSpec
            self.description = description
            self.displayName = displayName
            self.enableAutoBuild = enableAutoBuild
            self.enableBasicAuth = enableBasicAuth
            self.enableNotification = enableNotification
            self.enablePerformanceMode = enablePerformanceMode
            self.enablePullRequestPreview = enablePullRequestPreview
            self.environmentVariables = environmentVariables
            self.framework = framework
            self.pullRequestEnvironmentName = pullRequestEnvironmentName
            self.stage = stage
            self.tags = tags
            self.ttl = ttl
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.backendEnvironmentArn, name: "backendEnvironmentArn", parent: name, max: 1000)
            try self.validate(self.backendEnvironmentArn, name: "backendEnvironmentArn", parent: name, pattern: "^(?s)")
            try self.validate(self.basicAuthCredentials, name: "basicAuthCredentials", parent: name, max: 2000)
            try self.validate(self.basicAuthCredentials, name: "basicAuthCredentials", parent: name, pattern: "^(?s)")
            try self.validate(self.branchName, name: "branchName", parent: name, max: 255)
            try self.validate(self.branchName, name: "branchName", parent: name, min: 1)
            try self.validate(self.branchName, name: "branchName", parent: name, pattern: "^(?s).+$")
            try self.validate(self.buildSpec, name: "buildSpec", parent: name, max: 25000)
            try self.validate(self.buildSpec, name: "buildSpec", parent: name, min: 1)
            try self.validate(self.buildSpec, name: "buildSpec", parent: name, pattern: "^(?s).+$")
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^(?s)")
            try self.validate(self.displayName, name: "displayName", parent: name, max: 255)
            try self.validate(self.displayName, name: "displayName", parent: name, pattern: "^(?s)")
            try self.environmentVariables?.forEach {
                try validate($0.key, name: "environmentVariables.key", parent: name, max: 255)
                try validate($0.key, name: "environmentVariables.key", parent: name, pattern: "^(?s)")
                try validate($0.value, name: "environmentVariables[\"\($0.key)\"]", parent: name, max: 5500)
                try validate($0.value, name: "environmentVariables[\"\($0.key)\"]", parent: name, pattern: "^(?s)")
            }
            try self.validate(self.framework, name: "framework", parent: name, max: 255)
            try self.validate(self.framework, name: "framework", parent: name, pattern: "^(?s)")
            try self.validate(self.pullRequestEnvironmentName, name: "pullRequestEnvironmentName", parent: name, max: 20)
            try self.validate(self.pullRequestEnvironmentName, name: "pullRequestEnvironmentName", parent: name, pattern: "^(?s)")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.ttl, name: "ttl", parent: name, max: 32)
            try self.validate(self.ttl, name: "ttl", parent: name, pattern: "^\\d*$")
        }

        private enum CodingKeys: String, CodingKey {
            case backendEnvironmentArn
            case basicAuthCredentials
            case branchName
            case buildSpec
            case description
            case displayName
            case enableAutoBuild
            case enableBasicAuth
            case enableNotification
            case enablePerformanceMode
            case enablePullRequestPreview
            case environmentVariables
            case framework
            case pullRequestEnvironmentName
            case stage
            case tags
            case ttl
        }
    }

    public struct CreateBranchResult: AWSDecodableShape {
        ///  Describes the branch for an Amplify app, which maps to a third-party repository branch.
        public let branch: Branch

        public init(branch: Branch) {
            self.branch = branch
        }

        private enum CodingKeys: String, CodingKey {
            case branch
        }
    }

    public struct CreateDeploymentRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "branchName", location: .uri("branchName"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The name for the branch, for the job.
        public let branchName: String
        ///  An optional file map that contains the file name as the key and the file content md5 hash as the value. If this argument is provided, the service will generate a unique upload URL per file. Otherwise, the service will only generate a single upload URL for the zipped files.
        public let fileMap: [String: String]?

        public init(appId: String, branchName: String, fileMap: [String: String]? = nil) {
            self.appId = appId
            self.branchName = branchName
            self.fileMap = fileMap
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.branchName, name: "branchName", parent: name, max: 255)
            try self.validate(self.branchName, name: "branchName", parent: name, min: 1)
            try self.validate(self.branchName, name: "branchName", parent: name, pattern: "^(?s).+$")
            try self.fileMap?.forEach {
                try validate($0.key, name: "fileMap.key", parent: name, max: 255)
                try validate($0.key, name: "fileMap.key", parent: name, pattern: "^(?s)")
                try validate($0.value, name: "fileMap[\"\($0.key)\"]", parent: name, max: 32)
                try validate($0.value, name: "fileMap[\"\($0.key)\"]", parent: name, pattern: "^(?s)")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case fileMap
        }
    }

    public struct CreateDeploymentResult: AWSDecodableShape {
        ///  When the fileMap argument is provided in the request, fileUploadUrls will contain a map of file names to upload URLs.
        public let fileUploadUrls: [String: String]
        ///  The job ID for this deployment. will supply to start deployment api.
        public let jobId: String?
        ///  When the fileMap argument is not provided in the request, this zipUploadUrl is returned.
        public let zipUploadUrl: String

        public init(fileUploadUrls: [String: String], jobId: String? = nil, zipUploadUrl: String) {
            self.fileUploadUrls = fileUploadUrls
            self.jobId = jobId
            self.zipUploadUrl = zipUploadUrl
        }

        private enum CodingKeys: String, CodingKey {
            case fileUploadUrls
            case jobId
            case zipUploadUrl
        }
    }

    public struct CreateDomainAssociationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  Sets the branch patterns for automatic subdomain creation.
        public let autoSubDomainCreationPatterns: [String]?
        ///  The required AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) for automatically creating subdomains.
        public let autoSubDomainIAMRole: String?
        ///  The domain name for the domain association.
        public let domainName: String
        ///  Enables the automated creation of subdomains for branches.
        public let enableAutoSubDomain: Bool?
        ///  The setting for the subdomain.
        public let subDomainSettings: [SubDomainSetting]

        public init(appId: String, autoSubDomainCreationPatterns: [String]? = nil, autoSubDomainIAMRole: String? = nil, domainName: String, enableAutoSubDomain: Bool? = nil, subDomainSettings: [SubDomainSetting]) {
            self.appId = appId
            self.autoSubDomainCreationPatterns = autoSubDomainCreationPatterns
            self.autoSubDomainIAMRole = autoSubDomainIAMRole
            self.domainName = domainName
            self.enableAutoSubDomain = enableAutoSubDomain
            self.subDomainSettings = subDomainSettings
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.autoSubDomainCreationPatterns?.forEach {
                try validate($0, name: "autoSubDomainCreationPatterns[]", parent: name, max: 2048)
                try validate($0, name: "autoSubDomainCreationPatterns[]", parent: name, min: 1)
                try validate($0, name: "autoSubDomainCreationPatterns[]", parent: name, pattern: "^(?s).+$")
            }
            try self.validate(self.autoSubDomainIAMRole, name: "autoSubDomainIAMRole", parent: name, max: 1000)
            try self.validate(self.autoSubDomainIAMRole, name: "autoSubDomainIAMRole", parent: name, pattern: "^$|^arn:aws:iam::\\d{12}:role.+$")
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^(((?!-)[A-Za-z0-9-]{0,62}[A-Za-z0-9])\\.)+((?!-)[A-Za-z0-9-]{1,62}[A-Za-z0-9])(\\.)?$")
            try self.subDomainSettings.forEach {
                try $0.validate(name: "\(name).subDomainSettings[]")
            }
            try self.validate(self.subDomainSettings, name: "subDomainSettings", parent: name, max: 500)
        }

        private enum CodingKeys: String, CodingKey {
            case autoSubDomainCreationPatterns
            case autoSubDomainIAMRole
            case domainName
            case enableAutoSubDomain
            case subDomainSettings
        }
    }

    public struct CreateDomainAssociationResult: AWSDecodableShape {
        ///  Describes the structure of a domain association, which associates a custom domain with an Amplify app.
        public let domainAssociation: DomainAssociation

        public init(domainAssociation: DomainAssociation) {
            self.domainAssociation = domainAssociation
        }

        private enum CodingKeys: String, CodingKey {
            case domainAssociation
        }
    }

    public struct CreateWebhookRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The name for a branch that is part of an Amplify app.
        public let branchName: String
        ///  The description for a webhook.
        public let description: String?

        public init(appId: String, branchName: String, description: String? = nil) {
            self.appId = appId
            self.branchName = branchName
            self.description = description
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.branchName, name: "branchName", parent: name, max: 255)
            try self.validate(self.branchName, name: "branchName", parent: name, min: 1)
            try self.validate(self.branchName, name: "branchName", parent: name, pattern: "^(?s).+$")
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^(?s)")
        }

        private enum CodingKeys: String, CodingKey {
            case branchName
            case description
        }
    }

    public struct CreateWebhookResult: AWSDecodableShape {
        ///  Describes a webhook that connects repository events to an Amplify app.
        public let webhook: Webhook

        public init(webhook: Webhook) {
            self.webhook = webhook
        }

        private enum CodingKeys: String, CodingKey {
            case webhook
        }
    }

    public struct CustomRule: AWSEncodableShape & AWSDecodableShape {
        ///  The condition for a URL rewrite or redirect rule, such as a country code.
        public let condition: String?
        ///  The source pattern for a URL rewrite or redirect rule.
        public let source: String
        ///  The status code for a URL rewrite or redirect rule.
        ///   200  Represents a 200 rewrite rule.  301  Represents a 301 (moved pemanently) redirect rule. This and all future requests should be directed to the target URL.   302  Represents a 302 temporary redirect rule.  404  Represents a 404 redirect rule.  404-200  Represents a 404 rewrite rule.
        public let status: String?
        ///  The target pattern for a URL rewrite or redirect rule.
        public let target: String

        public init(condition: String? = nil, source: String, status: String? = nil, target: String) {
            self.condition = condition
            self.source = source
            self.status = status
            self.target = target
        }

        public func validate(name: String) throws {
            try self.validate(self.condition, name: "condition", parent: name, max: 2048)
            try self.validate(self.condition, name: "condition", parent: name, pattern: "^(?s)")
            try self.validate(self.source, name: "source", parent: name, max: 2048)
            try self.validate(self.source, name: "source", parent: name, min: 1)
            try self.validate(self.source, name: "source", parent: name, pattern: "^(?s).+$")
            try self.validate(self.status, name: "status", parent: name, max: 7)
            try self.validate(self.status, name: "status", parent: name, min: 3)
            try self.validate(self.status, name: "status", parent: name, pattern: "^.{3,7}$")
            try self.validate(self.target, name: "target", parent: name, max: 2048)
            try self.validate(self.target, name: "target", parent: name, min: 1)
            try self.validate(self.target, name: "target", parent: name, pattern: "^(?s).+$")
        }

        private enum CodingKeys: String, CodingKey {
            case condition
            case source
            case status
            case target
        }
    }

    public struct DeleteAppRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String

        public init(appId: String) {
            self.appId = appId
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteAppResult: AWSDecodableShape {
        public let app: App

        public init(app: App) {
            self.app = app
        }

        private enum CodingKeys: String, CodingKey {
            case app
        }
    }

    public struct DeleteBackendEnvironmentRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "environmentName", location: .uri("environmentName"))
        ]

        ///  The unique ID of an Amplify app.
        public let appId: String
        ///  The name of a backend environment of an Amplify app.
        public let environmentName: String

        public init(appId: String, environmentName: String) {
            self.appId = appId
            self.environmentName = environmentName
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.environmentName, name: "environmentName", parent: name, max: 255)
            try self.validate(self.environmentName, name: "environmentName", parent: name, min: 1)
            try self.validate(self.environmentName, name: "environmentName", parent: name, pattern: "^(?s).+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteBackendEnvironmentResult: AWSDecodableShape {
        ///  Describes the backend environment for an Amplify app.
        public let backendEnvironment: BackendEnvironment

        public init(backendEnvironment: BackendEnvironment) {
            self.backendEnvironment = backendEnvironment
        }

        private enum CodingKeys: String, CodingKey {
            case backendEnvironment
        }
    }

    public struct DeleteBranchRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "branchName", location: .uri("branchName"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The name for the branch.
        public let branchName: String

        public init(appId: String, branchName: String) {
            self.appId = appId
            self.branchName = branchName
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.branchName, name: "branchName", parent: name, max: 255)
            try self.validate(self.branchName, name: "branchName", parent: name, min: 1)
            try self.validate(self.branchName, name: "branchName", parent: name, pattern: "^(?s).+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteBranchResult: AWSDecodableShape {
        ///  The branch for an Amplify app, which maps to a third-party repository branch.
        public let branch: Branch

        public init(branch: Branch) {
            self.branch = branch
        }

        private enum CodingKeys: String, CodingKey {
            case branch
        }
    }

    public struct DeleteDomainAssociationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "domainName", location: .uri("domainName"))
        ]

        ///  The unique id for an Amplify app.
        public let appId: String
        ///  The name of the domain.
        public let domainName: String

        public init(appId: String, domainName: String) {
            self.appId = appId
            self.domainName = domainName
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^(((?!-)[A-Za-z0-9-]{0,62}[A-Za-z0-9])\\.)+((?!-)[A-Za-z0-9-]{1,62}[A-Za-z0-9])(\\.)?$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteDomainAssociationResult: AWSDecodableShape {
        public let domainAssociation: DomainAssociation

        public init(domainAssociation: DomainAssociation) {
            self.domainAssociation = domainAssociation
        }

        private enum CodingKeys: String, CodingKey {
            case domainAssociation
        }
    }

    public struct DeleteJobRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "branchName", location: .uri("branchName")),
            AWSMemberEncoding(label: "jobId", location: .uri("jobId"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The name for the branch, for the job.
        public let branchName: String
        ///  The unique ID for the job.
        public let jobId: String

        public init(appId: String, branchName: String, jobId: String) {
            self.appId = appId
            self.branchName = branchName
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.branchName, name: "branchName", parent: name, max: 255)
            try self.validate(self.branchName, name: "branchName", parent: name, min: 1)
            try self.validate(self.branchName, name: "branchName", parent: name, pattern: "^(?s).+$")
            try self.validate(self.jobId, name: "jobId", parent: name, max: 255)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteJobResult: AWSDecodableShape {
        public let jobSummary: JobSummary

        public init(jobSummary: JobSummary) {
            self.jobSummary = jobSummary
        }

        private enum CodingKeys: String, CodingKey {
            case jobSummary
        }
    }

    public struct DeleteWebhookRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "webhookId", location: .uri("webhookId"))
        ]

        ///  The unique ID for a webhook.
        public let webhookId: String

        public init(webhookId: String) {
            self.webhookId = webhookId
        }

        public func validate(name: String) throws {
            try self.validate(self.webhookId, name: "webhookId", parent: name, max: 255)
            try self.validate(self.webhookId, name: "webhookId", parent: name, pattern: "^(?s)")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteWebhookResult: AWSDecodableShape {
        ///  Describes a webhook that connects repository events to an Amplify app.
        public let webhook: Webhook

        public init(webhook: Webhook) {
            self.webhook = webhook
        }

        private enum CodingKeys: String, CodingKey {
            case webhook
        }
    }

    public struct DomainAssociation: AWSDecodableShape {
        ///  Sets branch patterns for automatic subdomain creation.
        public let autoSubDomainCreationPatterns: [String]?
        ///  The required AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) for automatically creating subdomains.
        public let autoSubDomainIAMRole: String?
        ///  The DNS record for certificate verification.
        public let certificateVerificationDNSRecord: String?
        ///  The Amazon Resource Name (ARN) for the domain association.
        public let domainAssociationArn: String
        ///  The name of the domain.
        public let domainName: String
        ///  The current status of the domain association.
        public let domainStatus: DomainStatus
        ///  Enables the automated creation of subdomains for branches.
        public let enableAutoSubDomain: Bool
        ///  The reason for the current status of the domain association.
        public let statusReason: String
        ///  The subdomains for the domain association.
        public let subDomains: [SubDomain]

        public init(autoSubDomainCreationPatterns: [String]? = nil, autoSubDomainIAMRole: String? = nil, certificateVerificationDNSRecord: String? = nil, domainAssociationArn: String, domainName: String, domainStatus: DomainStatus, enableAutoSubDomain: Bool, statusReason: String, subDomains: [SubDomain]) {
            self.autoSubDomainCreationPatterns = autoSubDomainCreationPatterns
            self.autoSubDomainIAMRole = autoSubDomainIAMRole
            self.certificateVerificationDNSRecord = certificateVerificationDNSRecord
            self.domainAssociationArn = domainAssociationArn
            self.domainName = domainName
            self.domainStatus = domainStatus
            self.enableAutoSubDomain = enableAutoSubDomain
            self.statusReason = statusReason
            self.subDomains = subDomains
        }

        private enum CodingKeys: String, CodingKey {
            case autoSubDomainCreationPatterns
            case autoSubDomainIAMRole
            case certificateVerificationDNSRecord
            case domainAssociationArn
            case domainName
            case domainStatus
            case enableAutoSubDomain
            case statusReason
            case subDomains
        }
    }

    public struct GenerateAccessLogsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The name of the domain.
        public let domainName: String
        ///  The time at which the logs should end. The time range specified is inclusive of the end time.
        public let endTime: Date?
        ///  The time at which the logs should start. The time range specified is inclusive of the start time.
        public let startTime: Date?

        public init(appId: String, domainName: String, endTime: Date? = nil, startTime: Date? = nil) {
            self.appId = appId
            self.domainName = domainName
            self.endTime = endTime
            self.startTime = startTime
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^(((?!-)[A-Za-z0-9-]{0,62}[A-Za-z0-9])\\.)+((?!-)[A-Za-z0-9-]{1,62}[A-Za-z0-9])(\\.)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case domainName
            case endTime
            case startTime
        }
    }

    public struct GenerateAccessLogsResult: AWSDecodableShape {
        ///  The pre-signed URL for the requested access logs.
        public let logUrl: String?

        public init(logUrl: String? = nil) {
            self.logUrl = logUrl
        }

        private enum CodingKeys: String, CodingKey {
            case logUrl
        }
    }

    public struct GetAppRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String

        public init(appId: String) {
            self.appId = appId
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetAppResult: AWSDecodableShape {
        public let app: App

        public init(app: App) {
            self.app = app
        }

        private enum CodingKeys: String, CodingKey {
            case app
        }
    }

    public struct GetArtifactUrlRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "artifactId", location: .uri("artifactId"))
        ]

        ///  The unique ID for an artifact.
        public let artifactId: String

        public init(artifactId: String) {
            self.artifactId = artifactId
        }

        public func validate(name: String) throws {
            try self.validate(self.artifactId, name: "artifactId", parent: name, max: 255)
            try self.validate(self.artifactId, name: "artifactId", parent: name, pattern: "^(?s)")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetArtifactUrlResult: AWSDecodableShape {
        ///  The unique ID for an artifact.
        public let artifactId: String
        ///  The presigned URL for the artifact.
        public let artifactUrl: String

        public init(artifactId: String, artifactUrl: String) {
            self.artifactId = artifactId
            self.artifactUrl = artifactUrl
        }

        private enum CodingKeys: String, CodingKey {
            case artifactId
            case artifactUrl
        }
    }

    public struct GetBackendEnvironmentRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "environmentName", location: .uri("environmentName"))
        ]

        ///  The unique id for an Amplify app.
        public let appId: String
        ///  The name for the backend environment.
        public let environmentName: String

        public init(appId: String, environmentName: String) {
            self.appId = appId
            self.environmentName = environmentName
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.environmentName, name: "environmentName", parent: name, max: 255)
            try self.validate(self.environmentName, name: "environmentName", parent: name, min: 1)
            try self.validate(self.environmentName, name: "environmentName", parent: name, pattern: "^(?s).+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetBackendEnvironmentResult: AWSDecodableShape {
        ///  Describes the backend environment for an Amplify app.
        public let backendEnvironment: BackendEnvironment

        public init(backendEnvironment: BackendEnvironment) {
            self.backendEnvironment = backendEnvironment
        }

        private enum CodingKeys: String, CodingKey {
            case backendEnvironment
        }
    }

    public struct GetBranchRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "branchName", location: .uri("branchName"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The name for the branch.
        public let branchName: String

        public init(appId: String, branchName: String) {
            self.appId = appId
            self.branchName = branchName
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.branchName, name: "branchName", parent: name, max: 255)
            try self.validate(self.branchName, name: "branchName", parent: name, min: 1)
            try self.validate(self.branchName, name: "branchName", parent: name, pattern: "^(?s).+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetBranchResult: AWSDecodableShape {
        public let branch: Branch

        public init(branch: Branch) {
            self.branch = branch
        }

        private enum CodingKeys: String, CodingKey {
            case branch
        }
    }

    public struct GetDomainAssociationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "domainName", location: .uri("domainName"))
        ]

        ///  The unique id for an Amplify app.
        public let appId: String
        ///  The name of the domain.
        public let domainName: String

        public init(appId: String, domainName: String) {
            self.appId = appId
            self.domainName = domainName
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^(((?!-)[A-Za-z0-9-]{0,62}[A-Za-z0-9])\\.)+((?!-)[A-Za-z0-9-]{1,62}[A-Za-z0-9])(\\.)?$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetDomainAssociationResult: AWSDecodableShape {
        ///  Describes the structure of a domain association, which associates a custom domain with an Amplify app.
        public let domainAssociation: DomainAssociation

        public init(domainAssociation: DomainAssociation) {
            self.domainAssociation = domainAssociation
        }

        private enum CodingKeys: String, CodingKey {
            case domainAssociation
        }
    }

    public struct GetJobRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "branchName", location: .uri("branchName")),
            AWSMemberEncoding(label: "jobId", location: .uri("jobId"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The branch name for the job.
        public let branchName: String
        ///  The unique ID for the job.
        public let jobId: String

        public init(appId: String, branchName: String, jobId: String) {
            self.appId = appId
            self.branchName = branchName
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.branchName, name: "branchName", parent: name, max: 255)
            try self.validate(self.branchName, name: "branchName", parent: name, min: 1)
            try self.validate(self.branchName, name: "branchName", parent: name, pattern: "^(?s).+$")
            try self.validate(self.jobId, name: "jobId", parent: name, max: 255)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetJobResult: AWSDecodableShape {
        public let job: Job

        public init(job: Job) {
            self.job = job
        }

        private enum CodingKeys: String, CodingKey {
            case job
        }
    }

    public struct GetWebhookRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "webhookId", location: .uri("webhookId"))
        ]

        ///  The unique ID for a webhook.
        public let webhookId: String

        public init(webhookId: String) {
            self.webhookId = webhookId
        }

        public func validate(name: String) throws {
            try self.validate(self.webhookId, name: "webhookId", parent: name, max: 255)
            try self.validate(self.webhookId, name: "webhookId", parent: name, pattern: "^(?s)")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetWebhookResult: AWSDecodableShape {
        ///  Describes the structure of a webhook.
        public let webhook: Webhook

        public init(webhook: Webhook) {
            self.webhook = webhook
        }

        private enum CodingKeys: String, CodingKey {
            case webhook
        }
    }

    public struct Job: AWSDecodableShape {
        ///  The execution steps for an execution job, for an Amplify app.
        public let steps: [Step]
        ///  Describes the summary for an execution job for an Amplify app.
        public let summary: JobSummary

        public init(steps: [Step], summary: JobSummary) {
            self.steps = steps
            self.summary = summary
        }

        private enum CodingKeys: String, CodingKey {
            case steps
            case summary
        }
    }

    public struct JobSummary: AWSDecodableShape {
        ///  The commit ID from a third-party repository provider for the job.
        public let commitId: String
        ///  The commit message from a third-party repository provider for the job.
        public let commitMessage: String
        ///  The commit date and time for the job.
        public let commitTime: Date
        ///  The end date and time for the job.
        public let endTime: Date?
        ///  The Amazon Resource Name (ARN) for the job.
        public let jobArn: String
        ///  The unique ID for the job.
        public let jobId: String
        ///  The type for the job. If the value is RELEASE, the job was manually released from its source by using the StartJob API. If the value is RETRY, the job was manually retried using the StartJob API. If the value is WEB_HOOK, the job was automatically triggered by webhooks.
        public let jobType: JobType
        ///  The start date and time for the job.
        public let startTime: Date
        ///  The current status for the job.
        public let status: JobStatus

        public init(commitId: String, commitMessage: String, commitTime: Date, endTime: Date? = nil, jobArn: String, jobId: String, jobType: JobType, startTime: Date, status: JobStatus) {
            self.commitId = commitId
            self.commitMessage = commitMessage
            self.commitTime = commitTime
            self.endTime = endTime
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobType = jobType
            self.startTime = startTime
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case commitId
            case commitMessage
            case commitTime
            case endTime
            case jobArn
            case jobId
            case jobType
            case startTime
            case status
        }
    }

    public struct ListAppsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        ///  The maximum number of records to list in a single response.
        public let maxResults: Int?
        ///  A pagination token. If non-null, the pagination token is returned in a result. Pass its value in another request to retrieve more entries.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2000)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^(?s)")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAppsResult: AWSDecodableShape {
        ///  A list of Amplify apps.
        public let apps: [App]
        ///  A pagination token. Set to null to start listing apps from start. If non-null, the pagination token is returned in a result. Pass its value in here to list more projects.
        public let nextToken: String?

        public init(apps: [App], nextToken: String? = nil) {
            self.apps = apps
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case apps
            case nextToken
        }
    }

    public struct ListArtifactsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "branchName", location: .uri("branchName")),
            AWSMemberEncoding(label: "jobId", location: .uri("jobId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The name of a branch that is part of an Amplify app.
        public let branchName: String
        ///  The unique ID for a job.
        public let jobId: String
        ///  The maximum number of records to list in a single response.
        public let maxResults: Int?
        ///  A pagination token. Set to null to start listing artifacts from start. If a non-null pagination token is returned in a result, pass its value in here to list more artifacts.
        public let nextToken: String?

        public init(appId: String, branchName: String, jobId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.appId = appId
            self.branchName = branchName
            self.jobId = jobId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.branchName, name: "branchName", parent: name, max: 255)
            try self.validate(self.branchName, name: "branchName", parent: name, min: 1)
            try self.validate(self.branchName, name: "branchName", parent: name, pattern: "^(?s).+$")
            try self.validate(self.jobId, name: "jobId", parent: name, max: 255)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[0-9]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2000)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^(?s)")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListArtifactsResult: AWSDecodableShape {
        ///  A list of artifacts.
        public let artifacts: [Artifact]
        ///  A pagination token. If a non-null pagination token is returned in a result, pass its value in another request to retrieve more entries.
        public let nextToken: String?

        public init(artifacts: [Artifact], nextToken: String? = nil) {
            self.artifacts = artifacts
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case artifacts
            case nextToken
        }
    }

    public struct ListBackendEnvironmentsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "environmentName", location: .querystring("environmentName")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The name of the backend environment
        public let environmentName: String?
        ///  The maximum number of records to list in a single response.
        public let maxResults: Int?
        ///  A pagination token. Set to null to start listing backend environments from the start. If a non-null pagination token is returned in a result, pass its value in here to list more backend environments.
        public let nextToken: String?

        public init(appId: String, environmentName: String? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.appId = appId
            self.environmentName = environmentName
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.environmentName, name: "environmentName", parent: name, max: 255)
            try self.validate(self.environmentName, name: "environmentName", parent: name, min: 1)
            try self.validate(self.environmentName, name: "environmentName", parent: name, pattern: "^(?s).+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2000)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^(?s)")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListBackendEnvironmentsResult: AWSDecodableShape {
        ///  The list of backend environments for an Amplify app.
        public let backendEnvironments: [BackendEnvironment]
        ///  A pagination token. If a non-null pagination token is returned in a result, pass its value in another request to retrieve more entries.
        public let nextToken: String?

        public init(backendEnvironments: [BackendEnvironment], nextToken: String? = nil) {
            self.backendEnvironments = backendEnvironments
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case backendEnvironments
            case nextToken
        }
    }

    public struct ListBranchesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The maximum number of records to list in a single response.
        public let maxResults: Int?
        ///  A pagination token. Set to null to start listing branches from the start. If a non-null pagination token is returned in a result, pass its value in here to list more branches.
        public let nextToken: String?

        public init(appId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.appId = appId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2000)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^(?s)")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListBranchesResult: AWSDecodableShape {
        ///  A list of branches for an Amplify app.
        public let branches: [Branch]
        ///  A pagination token. If a non-null pagination token is returned in a result, pass its value in another request to retrieve more entries.
        public let nextToken: String?

        public init(branches: [Branch], nextToken: String? = nil) {
            self.branches = branches
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case branches
            case nextToken
        }
    }

    public struct ListDomainAssociationsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The maximum number of records to list in a single response.
        public let maxResults: Int?
        ///  A pagination token. Set to null to start listing apps from the start. If non-null, a pagination token is returned in a result. Pass its value in here to list more projects.
        public let nextToken: String?

        public init(appId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.appId = appId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2000)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^(?s)")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListDomainAssociationsResult: AWSDecodableShape {
        ///  A list of domain associations.
        public let domainAssociations: [DomainAssociation]
        ///  A pagination token. If non-null, a pagination token is returned in a result. Pass its value in another request to retrieve more entries.
        public let nextToken: String?

        public init(domainAssociations: [DomainAssociation], nextToken: String? = nil) {
            self.domainAssociations = domainAssociations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case domainAssociations
            case nextToken
        }
    }

    public struct ListJobsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "branchName", location: .uri("branchName")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The name for a branch.
        public let branchName: String
        ///  The maximum number of records to list in a single response.
        public let maxResults: Int?
        ///  A pagination token. Set to null to start listing steps from the start. If a non-null pagination token is returned in a result, pass its value in here to list more steps.
        public let nextToken: String?

        public init(appId: String, branchName: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.appId = appId
            self.branchName = branchName
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.branchName, name: "branchName", parent: name, max: 255)
            try self.validate(self.branchName, name: "branchName", parent: name, min: 1)
            try self.validate(self.branchName, name: "branchName", parent: name, pattern: "^(?s).+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2000)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^(?s)")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListJobsResult: AWSDecodableShape {
        ///  The result structure for the list job result request.
        public let jobSummaries: [JobSummary]
        ///  A pagination token. If non-null the pagination token is returned in a result. Pass its value in another request to retrieve more entries.
        public let nextToken: String?

        public init(jobSummaries: [JobSummary], nextToken: String? = nil) {
            self.jobSummaries = jobSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case jobSummaries
            case nextToken
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn"))
        ]

        ///  The Amazon Resource Name (ARN) to use to list tags.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws:amplify:")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        ///  A list of tags for the specified The Amazon Resource Name (ARN).
        public let tags: [String: String]?

        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct ListWebhooksRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The maximum number of records to list in a single response.
        public let maxResults: Int?
        ///  A pagination token. Set to null to start listing webhooks from the start. If non-null,the pagination token is returned in a result. Pass its value in here to list more webhooks.
        public let nextToken: String?

        public init(appId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.appId = appId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2000)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^(?s)")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListWebhooksResult: AWSDecodableShape {
        ///  A pagination token. If non-null, the pagination token is returned in a result. Pass its value in another request to retrieve more entries.
        public let nextToken: String?
        ///  A list of webhooks.
        public let webhooks: [Webhook]

        public init(nextToken: String? = nil, webhooks: [Webhook]) {
            self.nextToken = nextToken
            self.webhooks = webhooks
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case webhooks
        }
    }

    public struct ProductionBranch: AWSDecodableShape {
        ///  The branch name for the production branch.
        public let branchName: String?
        ///  The last deploy time of the production branch.
        public let lastDeployTime: Date?
        ///  The status of the production branch.
        public let status: String?
        ///  The thumbnail URL for the production branch.
        public let thumbnailUrl: String?

        public init(branchName: String? = nil, lastDeployTime: Date? = nil, status: String? = nil, thumbnailUrl: String? = nil) {
            self.branchName = branchName
            self.lastDeployTime = lastDeployTime
            self.status = status
            self.thumbnailUrl = thumbnailUrl
        }

        private enum CodingKeys: String, CodingKey {
            case branchName
            case lastDeployTime
            case status
            case thumbnailUrl
        }
    }

    public struct StartDeploymentRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "branchName", location: .uri("branchName"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The name for the branch, for the job.
        public let branchName: String
        ///  The job ID for this deployment, generated by the create deployment request.
        public let jobId: String?
        ///  The source URL for this deployment, used when calling start deployment without create deployment. The source URL can be any HTTP GET URL that is publicly accessible and downloads a single .zip file.
        public let sourceUrl: String?

        public init(appId: String, branchName: String, jobId: String? = nil, sourceUrl: String? = nil) {
            self.appId = appId
            self.branchName = branchName
            self.jobId = jobId
            self.sourceUrl = sourceUrl
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.branchName, name: "branchName", parent: name, max: 255)
            try self.validate(self.branchName, name: "branchName", parent: name, min: 1)
            try self.validate(self.branchName, name: "branchName", parent: name, pattern: "^(?s).+$")
            try self.validate(self.jobId, name: "jobId", parent: name, max: 255)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[0-9]+$")
            try self.validate(self.sourceUrl, name: "sourceUrl", parent: name, max: 3000)
            try self.validate(self.sourceUrl, name: "sourceUrl", parent: name, pattern: "^(?s)")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId
            case sourceUrl
        }
    }

    public struct StartDeploymentResult: AWSDecodableShape {
        ///  The summary for the job.
        public let jobSummary: JobSummary

        public init(jobSummary: JobSummary) {
            self.jobSummary = jobSummary
        }

        private enum CodingKeys: String, CodingKey {
            case jobSummary
        }
    }

    public struct StartJobRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "branchName", location: .uri("branchName"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The branch name for the job.
        public let branchName: String
        ///  The commit ID from a third-party repository provider for the job.
        public let commitId: String?
        ///  The commit message from a third-party repository provider for the job.
        public let commitMessage: String?
        ///  The commit date and time for the job.
        public let commitTime: Date?
        ///  The unique ID for an existing job. This is required if the value of jobType is RETRY.
        public let jobId: String?
        ///  A descriptive reason for starting this job.
        public let jobReason: String?
        ///  Describes the type for the job. The job type RELEASE starts a new job with the latest change from the specified branch. This value is available only for apps that are connected to a repository. The job type RETRY retries an existing job. If the job type value is RETRY, the jobId is also required.
        public let jobType: JobType

        public init(appId: String, branchName: String, commitId: String? = nil, commitMessage: String? = nil, commitTime: Date? = nil, jobId: String? = nil, jobReason: String? = nil, jobType: JobType) {
            self.appId = appId
            self.branchName = branchName
            self.commitId = commitId
            self.commitMessage = commitMessage
            self.commitTime = commitTime
            self.jobId = jobId
            self.jobReason = jobReason
            self.jobType = jobType
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.branchName, name: "branchName", parent: name, max: 255)
            try self.validate(self.branchName, name: "branchName", parent: name, min: 1)
            try self.validate(self.branchName, name: "branchName", parent: name, pattern: "^(?s).+$")
            try self.validate(self.commitId, name: "commitId", parent: name, max: 255)
            try self.validate(self.commitId, name: "commitId", parent: name, pattern: "^(?s)")
            try self.validate(self.commitMessage, name: "commitMessage", parent: name, max: 10000)
            try self.validate(self.commitMessage, name: "commitMessage", parent: name, pattern: "^(?s)")
            try self.validate(self.jobId, name: "jobId", parent: name, max: 255)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[0-9]+$")
            try self.validate(self.jobReason, name: "jobReason", parent: name, max: 255)
            try self.validate(self.jobReason, name: "jobReason", parent: name, pattern: "^(?s)")
        }

        private enum CodingKeys: String, CodingKey {
            case commitId
            case commitMessage
            case commitTime
            case jobId
            case jobReason
            case jobType
        }
    }

    public struct StartJobResult: AWSDecodableShape {
        ///  The summary for the job.
        public let jobSummary: JobSummary

        public init(jobSummary: JobSummary) {
            self.jobSummary = jobSummary
        }

        private enum CodingKeys: String, CodingKey {
            case jobSummary
        }
    }

    public struct Step: AWSDecodableShape {
        ///  The URL to the artifact for the execution step.
        public let artifactsUrl: String?
        ///  The context for the current step. Includes a build image if the step is build.
        public let context: String?
        ///  The end date and time of the execution step.
        public let endTime: Date
        ///  The URL to the logs for the execution step.
        public let logUrl: String?
        ///  The list of screenshot URLs for the execution step, if relevant.
        public let screenshots: [String: String]?
        ///  The start date and time of the execution step.
        public let startTime: Date
        ///  The status of the execution step.
        public let status: JobStatus
        ///  The reason for the current step status.
        public let statusReason: String?
        ///  The name of the execution step.
        public let stepName: String
        ///  The URL to the test artifact for the execution step.
        public let testArtifactsUrl: String?
        ///  The URL to the test configuration for the execution step.
        public let testConfigUrl: String?

        public init(artifactsUrl: String? = nil, context: String? = nil, endTime: Date, logUrl: String? = nil, screenshots: [String: String]? = nil, startTime: Date, status: JobStatus, statusReason: String? = nil, stepName: String, testArtifactsUrl: String? = nil, testConfigUrl: String? = nil) {
            self.artifactsUrl = artifactsUrl
            self.context = context
            self.endTime = endTime
            self.logUrl = logUrl
            self.screenshots = screenshots
            self.startTime = startTime
            self.status = status
            self.statusReason = statusReason
            self.stepName = stepName
            self.testArtifactsUrl = testArtifactsUrl
            self.testConfigUrl = testConfigUrl
        }

        private enum CodingKeys: String, CodingKey {
            case artifactsUrl
            case context
            case endTime
            case logUrl
            case screenshots
            case startTime
            case status
            case statusReason
            case stepName
            case testArtifactsUrl
            case testConfigUrl
        }
    }

    public struct StopJobRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "branchName", location: .uri("branchName")),
            AWSMemberEncoding(label: "jobId", location: .uri("jobId"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The name for the branch, for the job.
        public let branchName: String
        ///  The unique id for the job.
        public let jobId: String

        public init(appId: String, branchName: String, jobId: String) {
            self.appId = appId
            self.branchName = branchName
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.branchName, name: "branchName", parent: name, max: 255)
            try self.validate(self.branchName, name: "branchName", parent: name, min: 1)
            try self.validate(self.branchName, name: "branchName", parent: name, pattern: "^(?s).+$")
            try self.validate(self.jobId, name: "jobId", parent: name, max: 255)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct StopJobResult: AWSDecodableShape {
        ///  The summary for the job.
        public let jobSummary: JobSummary

        public init(jobSummary: JobSummary) {
            self.jobSummary = jobSummary
        }

        private enum CodingKeys: String, CodingKey {
            case jobSummary
        }
    }

    public struct SubDomain: AWSDecodableShape {
        ///  The DNS record for the subdomain.
        public let dnsRecord: String
        ///  Describes the settings for the subdomain.
        public let subDomainSetting: SubDomainSetting
        ///  The verified status of the subdomain
        public let verified: Bool

        public init(dnsRecord: String, subDomainSetting: SubDomainSetting, verified: Bool) {
            self.dnsRecord = dnsRecord
            self.subDomainSetting = subDomainSetting
            self.verified = verified
        }

        private enum CodingKeys: String, CodingKey {
            case dnsRecord
            case subDomainSetting
            case verified
        }
    }

    public struct SubDomainSetting: AWSEncodableShape & AWSDecodableShape {
        ///  The branch name setting for the subdomain.
        public let branchName: String
        ///  The prefix setting for the subdomain.
        public let prefix: String

        public init(branchName: String, prefix: String) {
            self.branchName = branchName
            self.prefix = prefix
        }

        public func validate(name: String) throws {
            try self.validate(self.branchName, name: "branchName", parent: name, max: 255)
            try self.validate(self.branchName, name: "branchName", parent: name, min: 1)
            try self.validate(self.branchName, name: "branchName", parent: name, pattern: "^(?s).+$")
            try self.validate(self.prefix, name: "prefix", parent: name, max: 255)
            try self.validate(self.prefix, name: "prefix", parent: name, pattern: "^(?s)")
        }

        private enum CodingKeys: String, CodingKey {
            case branchName
            case prefix
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn"))
        ]

        ///  The Amazon Resource Name (ARN) to use to tag a resource.
        public let resourceArn: String
        ///  The tags used to tag the resource.
        public let tags: [String: String]

        public init(resourceArn: String, tags: [String: String]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws:amplify:")
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn")),
            AWSMemberEncoding(label: "tagKeys", location: .querystring("tagKeys"))
        ]

        ///  The Amazon Resource Name (ARN) to use to untag a resource.
        public let resourceArn: String
        ///  The tag keys to use to untag a resource.
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws:amplify:")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 50)
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateAppRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId"))
        ]

        /// The personal access token for a GitHub repository for an Amplify app. The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored. Use accessToken for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use oauthToken. You must specify either accessToken or oauthToken when you update an app. Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide .
        public let accessToken: String?
        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The automated branch creation configuration for an Amplify app.
        public let autoBranchCreationConfig: AutoBranchCreationConfig?
        ///  Describes the automated branch creation glob patterns for an Amplify app.
        public let autoBranchCreationPatterns: [String]?
        ///  The basic authorization credentials for an Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password.
        public let basicAuthCredentials: String?
        ///  The build specification (build spec) for an Amplify app.
        public let buildSpec: String?
        /// The custom HTTP headers for an Amplify app.
        public let customHeaders: String?
        ///  The custom redirect and rewrite rules for an Amplify app.
        public let customRules: [CustomRule]?
        ///  The description for an Amplify app.
        public let description: String?
        ///  Enables automated branch creation for an Amplify app.
        public let enableAutoBranchCreation: Bool?
        ///  Enables basic authorization for an Amplify app.
        public let enableBasicAuth: Bool?
        ///  Enables branch auto-building for an Amplify app.
        public let enableBranchAutoBuild: Bool?
        ///  Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git repository.
        public let enableBranchAutoDeletion: Bool?
        ///  The environment variables for an Amplify app.
        public let environmentVariables: [String: String]?
        ///  The AWS Identity and Access Management (IAM) service role for an Amplify app.
        public let iamServiceRoleArn: String?
        ///  The name for an Amplify app.
        public let name: String?
        /// The OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored. Use oauthToken for repository providers other than GitHub, such as Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, use accessToken. You must specify either oauthToken or accessToken when you update an app. Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide .
        public let oauthToken: String?
        ///  The platform for the Amplify app. For a static app, set the platform type to WEB. For a dynamic server-side rendered (SSR) app, set the platform type to WEB_COMPUTE. For an app requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC.
        public let platform: Platform?
        ///  The name of the repository for an Amplify app
        public let repository: String?

        public init(accessToken: String? = nil, appId: String, autoBranchCreationConfig: AutoBranchCreationConfig? = nil, autoBranchCreationPatterns: [String]? = nil, basicAuthCredentials: String? = nil, buildSpec: String? = nil, customHeaders: String? = nil, customRules: [CustomRule]? = nil, description: String? = nil, enableAutoBranchCreation: Bool? = nil, enableBasicAuth: Bool? = nil, enableBranchAutoBuild: Bool? = nil, enableBranchAutoDeletion: Bool? = nil, environmentVariables: [String: String]? = nil, iamServiceRoleArn: String? = nil, name: String? = nil, oauthToken: String? = nil, platform: Platform? = nil, repository: String? = nil) {
            self.accessToken = accessToken
            self.appId = appId
            self.autoBranchCreationConfig = autoBranchCreationConfig
            self.autoBranchCreationPatterns = autoBranchCreationPatterns
            self.basicAuthCredentials = basicAuthCredentials
            self.buildSpec = buildSpec
            self.customHeaders = customHeaders
            self.customRules = customRules
            self.description = description
            self.enableAutoBranchCreation = enableAutoBranchCreation
            self.enableBasicAuth = enableBasicAuth
            self.enableBranchAutoBuild = enableBranchAutoBuild
            self.enableBranchAutoDeletion = enableBranchAutoDeletion
            self.environmentVariables = environmentVariables
            self.iamServiceRoleArn = iamServiceRoleArn
            self.name = name
            self.oauthToken = oauthToken
            self.platform = platform
            self.repository = repository
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, max: 255)
            try self.validate(self.accessToken, name: "accessToken", parent: name, min: 1)
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^(?s).+$")
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.autoBranchCreationConfig?.validate(name: "\(name).autoBranchCreationConfig")
            try self.autoBranchCreationPatterns?.forEach {
                try validate($0, name: "autoBranchCreationPatterns[]", parent: name, max: 2048)
                try validate($0, name: "autoBranchCreationPatterns[]", parent: name, min: 1)
                try validate($0, name: "autoBranchCreationPatterns[]", parent: name, pattern: "^(?s).+$")
            }
            try self.validate(self.basicAuthCredentials, name: "basicAuthCredentials", parent: name, max: 2000)
            try self.validate(self.basicAuthCredentials, name: "basicAuthCredentials", parent: name, pattern: "^(?s)")
            try self.validate(self.buildSpec, name: "buildSpec", parent: name, max: 25000)
            try self.validate(self.buildSpec, name: "buildSpec", parent: name, min: 1)
            try self.validate(self.buildSpec, name: "buildSpec", parent: name, pattern: "^(?s).+$")
            try self.validate(self.customHeaders, name: "customHeaders", parent: name, max: 25000)
            try self.validate(self.customHeaders, name: "customHeaders", parent: name, pattern: "^(?s)")
            try self.customRules?.forEach {
                try $0.validate(name: "\(name).customRules[]")
            }
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^(?s)")
            try self.environmentVariables?.forEach {
                try validate($0.key, name: "environmentVariables.key", parent: name, max: 255)
                try validate($0.key, name: "environmentVariables.key", parent: name, pattern: "^(?s)")
                try validate($0.value, name: "environmentVariables[\"\($0.key)\"]", parent: name, max: 5500)
                try validate($0.value, name: "environmentVariables[\"\($0.key)\"]", parent: name, pattern: "^(?s)")
            }
            try self.validate(self.iamServiceRoleArn, name: "iamServiceRoleArn", parent: name, max: 1000)
            try self.validate(self.iamServiceRoleArn, name: "iamServiceRoleArn", parent: name, pattern: "^(?s)")
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^(?s).+$")
            try self.validate(self.oauthToken, name: "oauthToken", parent: name, max: 1000)
            try self.validate(self.oauthToken, name: "oauthToken", parent: name, pattern: "^(?s)")
            try self.validate(self.repository, name: "repository", parent: name, max: 1000)
            try self.validate(self.repository, name: "repository", parent: name, pattern: "^(?s)")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken
            case autoBranchCreationConfig
            case autoBranchCreationPatterns
            case basicAuthCredentials
            case buildSpec
            case customHeaders
            case customRules
            case description
            case enableAutoBranchCreation
            case enableBasicAuth
            case enableBranchAutoBuild
            case enableBranchAutoDeletion
            case environmentVariables
            case iamServiceRoleArn
            case name
            case oauthToken
            case platform
            case repository
        }
    }

    public struct UpdateAppResult: AWSDecodableShape {
        ///  Represents the updated Amplify app.
        public let app: App

        public init(app: App) {
            self.app = app
        }

        private enum CodingKeys: String, CodingKey {
            case app
        }
    }

    public struct UpdateBranchRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "branchName", location: .uri("branchName"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  The Amazon Resource Name (ARN) for a backend environment that is part of an Amplify app.
        public let backendEnvironmentArn: String?
        ///  The basic authorization credentials for the branch. You must base64-encode the authorization credentials and provide them in the format user:password.
        public let basicAuthCredentials: String?
        ///  The name for the branch.
        public let branchName: String
        ///  The build specification (build spec) for the branch.
        public let buildSpec: String?
        ///  The description for the branch.
        public let description: String?
        ///  The display name for a branch. This is used as the default domain prefix.
        public let displayName: String?
        ///  Enables auto building for the branch.
        public let enableAutoBuild: Bool?
        ///  Enables basic authorization for the branch.
        public let enableBasicAuth: Bool?
        ///  Enables notifications for the branch.
        public let enableNotification: Bool?
        /// Enables performance mode for the branch. Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out.
        public let enablePerformanceMode: Bool?
        ///  Enables pull request previews for this branch.
        public let enablePullRequestPreview: Bool?
        ///  The environment variables for the branch.
        public let environmentVariables: [String: String]?
        ///  The framework for the branch.
        public let framework: String?
        ///  The Amplify environment name for the pull request.
        public let pullRequestEnvironmentName: String?
        ///  Describes the current stage for the branch.
        public let stage: Stage?
        ///  The content Time to Live (TTL) for the website in seconds.
        public let ttl: String?

        public init(appId: String, backendEnvironmentArn: String? = nil, basicAuthCredentials: String? = nil, branchName: String, buildSpec: String? = nil, description: String? = nil, displayName: String? = nil, enableAutoBuild: Bool? = nil, enableBasicAuth: Bool? = nil, enableNotification: Bool? = nil, enablePerformanceMode: Bool? = nil, enablePullRequestPreview: Bool? = nil, environmentVariables: [String: String]? = nil, framework: String? = nil, pullRequestEnvironmentName: String? = nil, stage: Stage? = nil, ttl: String? = nil) {
            self.appId = appId
            self.backendEnvironmentArn = backendEnvironmentArn
            self.basicAuthCredentials = basicAuthCredentials
            self.branchName = branchName
            self.buildSpec = buildSpec
            self.description = description
            self.displayName = displayName
            self.enableAutoBuild = enableAutoBuild
            self.enableBasicAuth = enableBasicAuth
            self.enableNotification = enableNotification
            self.enablePerformanceMode = enablePerformanceMode
            self.enablePullRequestPreview = enablePullRequestPreview
            self.environmentVariables = environmentVariables
            self.framework = framework
            self.pullRequestEnvironmentName = pullRequestEnvironmentName
            self.stage = stage
            self.ttl = ttl
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.validate(self.backendEnvironmentArn, name: "backendEnvironmentArn", parent: name, max: 1000)
            try self.validate(self.backendEnvironmentArn, name: "backendEnvironmentArn", parent: name, pattern: "^(?s)")
            try self.validate(self.basicAuthCredentials, name: "basicAuthCredentials", parent: name, max: 2000)
            try self.validate(self.basicAuthCredentials, name: "basicAuthCredentials", parent: name, pattern: "^(?s)")
            try self.validate(self.branchName, name: "branchName", parent: name, max: 255)
            try self.validate(self.branchName, name: "branchName", parent: name, min: 1)
            try self.validate(self.branchName, name: "branchName", parent: name, pattern: "^(?s).+$")
            try self.validate(self.buildSpec, name: "buildSpec", parent: name, max: 25000)
            try self.validate(self.buildSpec, name: "buildSpec", parent: name, min: 1)
            try self.validate(self.buildSpec, name: "buildSpec", parent: name, pattern: "^(?s).+$")
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^(?s)")
            try self.validate(self.displayName, name: "displayName", parent: name, max: 255)
            try self.validate(self.displayName, name: "displayName", parent: name, pattern: "^(?s)")
            try self.environmentVariables?.forEach {
                try validate($0.key, name: "environmentVariables.key", parent: name, max: 255)
                try validate($0.key, name: "environmentVariables.key", parent: name, pattern: "^(?s)")
                try validate($0.value, name: "environmentVariables[\"\($0.key)\"]", parent: name, max: 5500)
                try validate($0.value, name: "environmentVariables[\"\($0.key)\"]", parent: name, pattern: "^(?s)")
            }
            try self.validate(self.framework, name: "framework", parent: name, max: 255)
            try self.validate(self.framework, name: "framework", parent: name, pattern: "^(?s)")
            try self.validate(self.pullRequestEnvironmentName, name: "pullRequestEnvironmentName", parent: name, max: 20)
            try self.validate(self.pullRequestEnvironmentName, name: "pullRequestEnvironmentName", parent: name, pattern: "^(?s)")
            try self.validate(self.ttl, name: "ttl", parent: name, max: 32)
            try self.validate(self.ttl, name: "ttl", parent: name, pattern: "^\\d*$")
        }

        private enum CodingKeys: String, CodingKey {
            case backendEnvironmentArn
            case basicAuthCredentials
            case buildSpec
            case description
            case displayName
            case enableAutoBuild
            case enableBasicAuth
            case enableNotification
            case enablePerformanceMode
            case enablePullRequestPreview
            case environmentVariables
            case framework
            case pullRequestEnvironmentName
            case stage
            case ttl
        }
    }

    public struct UpdateBranchResult: AWSDecodableShape {
        ///  The branch for an Amplify app, which maps to a third-party repository branch.
        public let branch: Branch

        public init(branch: Branch) {
            self.branch = branch
        }

        private enum CodingKeys: String, CodingKey {
            case branch
        }
    }

    public struct UpdateDomainAssociationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appId", location: .uri("appId")),
            AWSMemberEncoding(label: "domainName", location: .uri("domainName"))
        ]

        ///  The unique ID for an Amplify app.
        public let appId: String
        ///  Sets the branch patterns for automatic subdomain creation.
        public let autoSubDomainCreationPatterns: [String]?
        ///  The required AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) for automatically creating subdomains.
        public let autoSubDomainIAMRole: String?
        ///  The name of the domain.
        public let domainName: String
        ///  Enables the automated creation of subdomains for branches.
        public let enableAutoSubDomain: Bool?
        ///  Describes the settings for the subdomain.
        public let subDomainSettings: [SubDomainSetting]?

        public init(appId: String, autoSubDomainCreationPatterns: [String]? = nil, autoSubDomainIAMRole: String? = nil, domainName: String, enableAutoSubDomain: Bool? = nil, subDomainSettings: [SubDomainSetting]? = nil) {
            self.appId = appId
            self.autoSubDomainCreationPatterns = autoSubDomainCreationPatterns
            self.autoSubDomainIAMRole = autoSubDomainIAMRole
            self.domainName = domainName
            self.enableAutoSubDomain = enableAutoSubDomain
            self.subDomainSettings = subDomainSettings
        }

        public func validate(name: String) throws {
            try self.validate(self.appId, name: "appId", parent: name, max: 20)
            try self.validate(self.appId, name: "appId", parent: name, min: 1)
            try self.validate(self.appId, name: "appId", parent: name, pattern: "^d[a-z0-9]+$")
            try self.autoSubDomainCreationPatterns?.forEach {
                try validate($0, name: "autoSubDomainCreationPatterns[]", parent: name, max: 2048)
                try validate($0, name: "autoSubDomainCreationPatterns[]", parent: name, min: 1)
                try validate($0, name: "autoSubDomainCreationPatterns[]", parent: name, pattern: "^(?s).+$")
            }
            try self.validate(self.autoSubDomainIAMRole, name: "autoSubDomainIAMRole", parent: name, max: 1000)
            try self.validate(self.autoSubDomainIAMRole, name: "autoSubDomainIAMRole", parent: name, pattern: "^$|^arn:aws:iam::\\d{12}:role.+$")
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^(((?!-)[A-Za-z0-9-]{0,62}[A-Za-z0-9])\\.)+((?!-)[A-Za-z0-9-]{1,62}[A-Za-z0-9])(\\.)?$")
            try self.subDomainSettings?.forEach {
                try $0.validate(name: "\(name).subDomainSettings[]")
            }
            try self.validate(self.subDomainSettings, name: "subDomainSettings", parent: name, max: 500)
        }

        private enum CodingKeys: String, CodingKey {
            case autoSubDomainCreationPatterns
            case autoSubDomainIAMRole
            case enableAutoSubDomain
            case subDomainSettings
        }
    }

    public struct UpdateDomainAssociationResult: AWSDecodableShape {
        ///  Describes a domain association, which associates a custom domain with an Amplify app.
        public let domainAssociation: DomainAssociation

        public init(domainAssociation: DomainAssociation) {
            self.domainAssociation = domainAssociation
        }

        private enum CodingKeys: String, CodingKey {
            case domainAssociation
        }
    }

    public struct UpdateWebhookRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "webhookId", location: .uri("webhookId"))
        ]

        ///  The name for a branch that is part of an Amplify app.
        public let branchName: String?
        ///  The description for a webhook.
        public let description: String?
        ///  The unique ID for a webhook.
        public let webhookId: String

        public init(branchName: String? = nil, description: String? = nil, webhookId: String) {
            self.branchName = branchName
            self.description = description
            self.webhookId = webhookId
        }

        public func validate(name: String) throws {
            try self.validate(self.branchName, name: "branchName", parent: name, max: 255)
            try self.validate(self.branchName, name: "branchName", parent: name, min: 1)
            try self.validate(self.branchName, name: "branchName", parent: name, pattern: "^(?s).+$")
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^(?s)")
            try self.validate(self.webhookId, name: "webhookId", parent: name, max: 255)
            try self.validate(self.webhookId, name: "webhookId", parent: name, pattern: "^(?s)")
        }

        private enum CodingKeys: String, CodingKey {
            case branchName
            case description
        }
    }

    public struct UpdateWebhookResult: AWSDecodableShape {
        ///  Describes a webhook that connects repository events to an Amplify app.
        public let webhook: Webhook

        public init(webhook: Webhook) {
            self.webhook = webhook
        }

        private enum CodingKeys: String, CodingKey {
            case webhook
        }
    }

    public struct Webhook: AWSDecodableShape {
        ///  The name for a branch that is part of an Amplify app.
        public let branchName: String
        ///  The create date and time for a webhook.
        public let createTime: Date
        ///  The description for a webhook.
        public let description: String
        ///  Updates the date and time for a webhook.
        public let updateTime: Date
        ///  The Amazon Resource Name (ARN) for the webhook.
        public let webhookArn: String
        ///  The ID of the webhook.
        public let webhookId: String
        ///  The URL of the webhook.
        public let webhookUrl: String

        public init(branchName: String, createTime: Date, description: String, updateTime: Date, webhookArn: String, webhookId: String, webhookUrl: String) {
            self.branchName = branchName
            self.createTime = createTime
            self.description = description
            self.updateTime = updateTime
            self.webhookArn = webhookArn
            self.webhookId = webhookId
            self.webhookUrl = webhookUrl
        }

        private enum CodingKeys: String, CodingKey {
            case branchName
            case createTime
            case description
            case updateTime
            case webhookArn
            case webhookId
            case webhookUrl
        }
    }
}

// MARK: - Errors

/// Error enum for Amplify
public struct AmplifyErrorType: AWSErrorType {
    enum Code: String {
        case badRequestException = "BadRequestException"
        case dependentServiceFailureException = "DependentServiceFailureException"
        case internalFailureException = "InternalFailureException"
        case limitExceededException = "LimitExceededException"
        case notFoundException = "NotFoundException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case unauthorizedException = "UnauthorizedException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize Amplify
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    ///  A request contains unexpected data.
    public static var badRequestException: Self { .init(.badRequestException) }
    ///  An operation failed because a dependent service threw an exception.
    public static var dependentServiceFailureException: Self { .init(.dependentServiceFailureException) }
    ///  The service failed to perform an operation due to an internal issue.
    public static var internalFailureException: Self { .init(.internalFailureException) }
    ///  A resource could not be created because service quotas were exceeded.
    public static var limitExceededException: Self { .init(.limitExceededException) }
    ///  An entity was not found during an operation.
    public static var notFoundException: Self { .init(.notFoundException) }
    ///  An operation failed due to a non-existent resource.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    ///  An operation failed due to a lack of access.
    public static var unauthorizedException: Self { .init(.unauthorizedException) }
}

extension AmplifyErrorType: Equatable {
    public static func == (lhs: AmplifyErrorType, rhs: AmplifyErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension AmplifyErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
